﻿namespace ZOIL.DataModel
{
    public class LinkManager
    {
        public static ILink AddNonDirectionalLink(IInformationItem node1, IInformationItem node2)
        {
            var link = new NonDirectionalLink(node1, node2);

            node1.AddLink(link);
            node2.AddLink(link);

            return link;
        }
        public static ILink AddDirectionalLink(IInformationItem source, IInformationItem target, Direction direction)
        {
            var link = new DirectionalLink(source, target, direction);

            source.AddLink(link);
            target.AddLink(link);

            return link;
        }
    }
}